#include <iostream>
#include <vector>
#include "mutex.h"
#include "thread.h"
/**
 * @brief 协程调度器
 */
class Scheduler{
public:
    typedef std::shared_ptr<Scheduler> ptr;
    typedef Mutex MutexType;
    
    Scheduler(size_t threads = 1, bool use_caller = true, const std::string &name = "Scheduler")；
    virtual ~Scheduler();

    const std::string &getName() const { return m_name;}

private:

    // 协程调度器名字
    std::string m_name;

    // 互斥锁
    MutexType m_mutex;

    // 线程池
    std::vector<Thread::ptr> m_threads;
} 